﻿@using DNA.Mvc.Security;
@using DNA.Mvc.Text;
@model Article
@{  
    var article = new ArticleWrapper(Model);
    var _content = article.GetGlobalizationContent();  
}
<h1 class="dna-post-title">
    @_content.Title @Publishing.PostStateImage(Model, Url)
</h1>
<hr />
<ul class="d-horizontal-list">
    <li>
        @{ Html.RenderPartial("_Tagged", Model); }
    </li>
    <li>
        @{ Html.RenderPartial("_FiledUnder", article.AllCategories()); }
    </li>
    <li>
        @Ajax.Dna().Link("#commentlist").Text(article.Comments.Count.ToString()).ToolTip(Html.Global("publishing", "GoToComments")).ImageIcons(Url.Content("~/Content/Images/comments.gif")).GetHtml()
    </li>
</ul>
@if (string.IsNullOrEmpty(Model.Password) || (Request.IsAuthenticated && (User.Identity.Name.Equals(article.Author.UserName, StringComparison.OrdinalIgnoreCase))))
{
    Html.RenderPartial("_ContentBody", Model);
}
else
{
    Html.RenderAction("UnlockConent", "Article", new { Area = "Publishing", id = Model.ID });
}
@Html.StartupScripts()
